package com.turtle3d.user.grammars;

import com.turtle3d.formallanguage.grammar.Grammar;
import com.turtle3d.formallanguage.parser.SimpleParser;
import com.turtle3d.formallanguage.symbol.Symbol;
import com.turtle3d.formallanguage.symbol.SymbolFactory;

public class Bush extends Grammar{

	public void define(){		
		
		setAxiom(SymbolFactory.getSymbolFactory().createSymbolofClass("A"));		
		
		addProduction(SimpleParser.parseProduction("A->[\\FLA]>>>>>[\\FLA]>>>>>>>[\\FLA]"));
		addProduction(SimpleParser.parseProduction("A->[\\FLA]>>>>[\\FLA]>>>>[\\FLA]>>>>[\\FLA]"));
		addProduction(SimpleParser.parseProduction("F->S>>>>>F"));
		addProduction(SimpleParser.parseProduction("S->RFL"));
		addProduction(SimpleParser.parseProduction("L->[//B]"));	
		
	}
	
	public void setRequiredParameters(){
		setRequiredParameter(Symbol.TURN_ANGLE, 22.5f);
		setRequiredParameter(Symbol.PITCH_ANGLE, 22.5f);
		setRequiredParameter(Symbol.ROLL_ANGLE, 22.5f);
	}
	
}
